﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HotelManagement._04.OBJECT;
using HotelManagement._03.DAO;

namespace HotelManagement._02.BUS
{
    class CustomerBUS
    {
        CustomerDAO m_CustomerDAO = new CustomerDAO();
        public DataTable ViewCustomer()
        {
            return m_CustomerDAO.ViewCustomer("pr_tblCustomer_SelectAll");
        }
        public DataTable ViewCustomerById(int ip_Id)
        {
            return m_CustomerDAO.ViewCustomerById(ip_Id,"pr_tblCustomer_SelectRow");
        }
        public bool AddCustomer(Customer ip_Customer)
        {
            return m_CustomerDAO.AddCustomer(ip_Customer, "pr_tblCustomer_Insert");
        }
        public bool UpdateCustomer(Customer ip_Customer)
        {
            return m_CustomerDAO.UpdateCustomer(ip_Customer, "pr_tblCustomer_Update");
        }
        public bool DeleteCustomer(Customer ip_Customer)
        {
            return m_CustomerDAO.DeleteCustomer(ip_Customer, "pr_tblCustomer_DeleteRow");
        }
        public DataTable SearchCustomer(string ip_KeyWord)
        {
            return m_CustomerDAO.Search(ip_KeyWord, "pr_tblCustomer_Search");
        }
        public bool FindByPassport(Customer ip_Customer)
        {
            return m_CustomerDAO.Find(ip_Customer, "pr_tblCustomer_FindByPassport");
        }
        public DataTable Search(Customer ip_Customer)
        {
            return m_CustomerDAO.SearchCustomer(ip_Customer, "pr_tblCustomer_SearchCustomer");
        }
 
    }
}
